<extend name="Public/base" />
<block name="body">
    <div class="main-title">
         <h2>新增请假记录</h2>
    </div>
    <div class="tab-wrap with-padding">
        <div class="node-list">
            <div class="tab-pane in">
                <form action="{:U('addrecord')}" method="POST" class="form-horizontal auth-form">
                 <input type="hidden" name="id" value="{$data.id}" />
                    <div class="form-item cf">
                        <label class="item-label">请假类型<span class="check-tips"></span></label>

                        <div class="controls">
                            <select name="type" data-role="select_text" class="form-control" style="width:25%">
                                <option value="0">请选择</option>
                                <volist name="typeList" id="vo">
                                <option value="{$vo.id}" >{$vo.title}</option>                               
                                </volist>
                                   
                            </select>
                                  
                        </div>
                    </div>
                    <br/>
                    <div class="form-item cf">
                        <label class="item-label">请假日期<span class="check-tips"></span></label>

                        <div class="controls">
            <script src="__PUBLIC__/date/js/jquery.1.7.2.min.js"></script>
            <script src="__PUBLIC__/date/js/mobiscroll_002.js" type="text/javascript"></script>
            <script src="__PUBLIC__/date/js/mobiscroll_004.js" type="text/javascript"></script>
            <link href="__PUBLIC__/date/css/mobiscroll_002.css" rel="stylesheet" type="text/css">
            <link href="__PUBLIC__/date/css/mobiscroll.css" rel="stylesheet" type="text/css">
            <script src="__PUBLIC__/date/js/mobiscroll.js" type="text/javascript"></script>
            <script src="__PUBLIC__/date/js/mobiscroll_003.js" type="text/javascript"></script>
            <script src="__PUBLIC__/date/js/mobiscroll_005.js" type="text/javascript"></script>
            <link href="__PUBLIC__/date/css/mobiscroll_003.css" rel="stylesheet" type="text/css">
                    <input value="{$lastmonth}" class="" readonly="readonly" name="createtime" id="staDate" type="text">
                <script type="text/javascript">
                    $(function () {
                        var currYear = (new Date()).getFullYear();  
                        var opt={};
                        opt.date = {preset : 'date'};
                        opt.datetime = {preset : 'datetime'};
                        opt.time = {preset : 'time'};
                        opt.default = {
                            theme: 'android-ics light', //皮肤样式
                            display: 'modal', //显示方式 
                            mode: 'scroller', //日期选择模式
                            dateFormat: 'yyyy-mm-dd',
                            lang: 'zh',
                            showNow: true,
                            nowText: "今天",
                            startYear: currYear - 10, //开始年份
                            endYear: currYear + 10 //结束年份
                        };
                        $("#staDate").mobiscroll($.extend(opt['date'], opt['default']));
                        var optDateTime = $.extend(opt['datetime'], opt['default']);
                        var optTime = $.extend(opt['time'], opt['default']);
                        $("#staDate").mobiscroll(optDateTime).datetime(optDateTime);
                        $("#appTime").mobiscroll(optTime).time(optTime);
                    });
                </script>          
                        </div>
                    </div>
                    <br/>
                    <div class="form-item cf">
                        <label class="item-label">请假天数<span class="check-tips"></span></label>
                        <div class="controls">
                            <input type="number" min="0" class="text input-large form-control form-input-width" name="days" value="{$data.attendance_days}" placeholder="" >
                        </div>
                    </div>
                    <br/>
                    <div class="form-item cf">
                        <label class="item-label">请假原因<span class="check-tips"></span></label>
                        <div class="controls">
                            <textarea class="text input-large form-control form-input-width" row="3" name="reason" placeholder="请输入备注信息，最多100个字符" maxlength="100"></textarea>
                        </div>
                    </div>

                    <div style="margin-top: 20px;"></div>
                    <button type="submit" class="btn submit-btn ajax-post" target-form="auth-form">{:L("_SURE_WITH_SPACE_")}</button>
                    <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">{:L("_RETURN_WITH_SPACE_")}</button>
                    <!-- <input type="submit" name=""/> -->
                </form>
            </div>
        </div>
    </div>

</block>
<block name="script">
    <script type="text/javascript" src="__STATIC__/qtip/jquery.qtip.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/qtip/jquery.qtip.min.css" media="all">
    <script type="text/javascript" charset="utf-8">
       
        //导航高亮
        highlight_subnav('{:U('index')}');
    </script>
</block>
